﻿using UnityEngine;
using System.Collections;
using UnityEngine.EventSystems;

public class Button : MonoBehaviour, IPointerDownHandler, IPointerUpHandler
{
	// WHY DOES EVENTDATA NOT CONTAIN A REFERENCE TO THE OBJECT THAT HAS SENT THE EVENT?!?
	// i don't want one of these scripts for every damn button.

	public void OnPointerDown(PointerEventData eventData)
	{
		GetComponent<RectTransform>().localScale = Vector3.one * 0.9f;
		Debug.Log("Mouse down");
	}

	public void OnPointerUp(PointerEventData eventData)
	{
		GetComponent<RectTransform>().localScale = Vector3.one;
		Debug.Log("Mouse up");
	}
}
